home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / games / strategy / madgic-corewar-4.0.lzh / 1989 / Quarter.s < prev    next >
Text File  |  1992-03-10  |  2KB  |  34 lines

  1. ;
  2. ; Quarter
  3. ;
  4. ; by Stefan HanBgen
  5. ;
  6. ; Copies a killer to every quater of the core, and splits into four 
  7. ; processes, each one bombing its slice of memory.  Not very subtle, 
  8. ; but quite powerful since the killers produce a bomb with every 
  9. ; second instruction, and are difficult to hit.  The killers destroy 
  10. ; each other after they have bombed through their quater, but the 
  11. ; battle should be decided before this happens.  Speed is the 
  12. ; important factor.
  13. ;
  14. Z1       DAT             # 2062   ; pointer to copies, the Killers are
  15. Z2       DAT             # 4110   ;  placed at equal distances in memory
  16. Z3       DAT             # 6158   ;  formula: zi = i * slen / 4 + dist
  17.                                   ;   where slen = 8192        arena size
  18.                                   ;   and   dist = loop - z1   offset
  19. START    MOV     KILL    < Z2     ; copy one Killer
  20.          MOV     LOOP    < Z2     ; 
  21.          SPL   @ Z2               ; spawn copied Killer
  22.          MOV     KILL    < Z1     ; copy another Killer
  23.          MOV     LOOP    < Z1     ;
  24.          SPL   @ Z1               ; spawn the second Killer
  25.          MOV     KILL    < Z3     ; for the third time, copy and
  26.          MOV     LOOP    < Z3     ;
  27.          SPL   @ Z3               ; spawn a Killer
  28.          JMP     LOOP             ; jump to the fourth Killer
  29. PTR      DAT             # 0      ;
  30. LOOP     MOV     PTR     < PTR    ; bomb with DAT
  31. KILL     DJN     LOOP      PTR    ; at every other location in the arena
  32.          END     START
  33.  
  34. ;